<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page import="java.io.*,java.util.*, javax.servlet.*" %>
<%@ page import="javax.servlet.http.*" %>
<%@ page import="org.apache.commons.fileupload.*" %>
<%@ page import="org.apache.commons.fileupload.disk.*" %>
<%@ page import="org.apache.commons.fileupload.servlet.*" %>
<%@ page import="org.apache.commons.io.output.*" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<% 
	String img1 = (String)request.getAttribute("img1");
	String img2 = (String)request.getAttribute("img2");
	int mode;
	if(request.getAttribute("mode")!=null)
    {
    	img1 = (String)request.getSession().getAttribute("img1");
		img2 = (String)request.getSession().getAttribute("img2");
    	mode=Integer.parseInt(request.getAttribute("mode").toString());
    }
   	else
   	{
   		img1 = (String)request.getAttribute("img1");
		img2 = (String)request.getAttribute("img2");
   		mode=0;
    }
	
	//out.println(arg +"   "+imgpath);
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <base href="<%=basePath%>">
    
	<meta charset="utf-8"/>
	<link href="css/bootstrap.css" rel="stylesheet">
	<link rel="stylesheet" href="css/main.css">
	<link rel="stylesheet" href="css/datepicker.css">

	<script src="js/jquery.js"></script>
	<script src="js/bootstrap.js"></script>
	<script src="js/bootstrap-datepicker.js"></script>
	<title>名片管理系统</title>
	</head>
<script language="javascript">
$(function(){
	$("#optionsRadios1").click(function(){
		$("#optionsRadios2").attr("checked",false);
		$("#upload").attr("action","fileUpload?arg=1&img2="+$("#img2").val());
	});
	
	$("#optionsRadios2").click(function(){
		$("#optionsRadios1").attr("checked",false);
		$("#upload").attr("action","fileUpload?arg=2&img1="+$("#img1").val());
	});
	
	$("#birthday").click(function()
	{
		$('#birthday').datepicker({
			format: 'yyyy-mm-dd'
		});
	});
	
	$("#zipemail1").blur(function()
	{
	   var email = $("#zipemail1").val();
	   if(email.length > 0)
	   {
            var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
            if(!regExp.test(email))
            {
                alert("请输入正确的邮件地址!例如“123@QQ.com”");
                $("#zipemail1").focus();
                $("#zipemail1").empty();
            }	
       }
	});
	
	$("#zipemail2").blur(function()
	{
	   var email = $("#zipemail2").val();
	   if(email.length > 0)
	   {
            var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
            if(!regExp.test(email))
            {
                alert("请输入正确的邮件地址!例如“123@QQ.com”");
                $("#zipemail2").focus();
                $("#zipemail2").empty();
            }	
       }
	});
	if($("#mode").val() == 2)
	{
		$('input').attr("disabled","disabled");
		$('select').attr("disabled","disabled");
		$('textarea').attr("disabled","disabled");
	}
	
});

</script>


<body>
	<br>
	
	<div id="searchdiv" style="background-color:#efefef;height:600px">
		<div style="width:400px;float:left">
			<p><strong>名片正面</strong>&nbsp;<input checked="checked" type="radio"name="optionsRadios1" id="optionsRadios1" /></p>
			<img
			 class="img-rounded" style="margin-left:30px;" alt="正面" 
			 src="upload/<%=img1 %>" width="350px" height="250px">
			 <input id="img1" type="hidden" value="<%=img1 %>" />		 
			<p><strong>名片反面</strong>&nbsp;<input type="radio"name="optionsRadios2" id="optionsRadios2" /></p>
			<img
			class="img-rounded" style="margin-left:30px;" alt="反面"
			 src="upload/<%=img2 %>" width="350px" height="250px">
			 <input id="img2" type="hidden" value="<%=img2 %>" />
		</div>
		<div style="width:480px;float:left">
<ul class="nav nav-tabs">
  <li class="active"><a href="#basic" data-toggle="tab">基本信息</a></li>
  <li><a href="#addr1" data-toggle="tab">住址1</a></li>
  <li><a href="#addr2" data-toggle="tab">住址2</a></li>
  <li><a href="#else" data-toggle="tab">其他</a></li>
  <li><a href="#pinfo" data-toggle="tab">个人信息</a></li>
  <li><a href="#cmpinfo" data-toggle="tab">公司信息</a></li>
</ul>
<div class="tab-content">
	<div class="tab-pane active" id="basic">
	<form id="upload" action="fileUpload?arg=1&img2=<%=img2 %>" method="post" enctype="multipart/form-data" >
        <table>
				<tr>
					<td><strong>名片图片上传</strong></td>
					<td></td>
				</tr>
				<tr>
					<td><input <%if(mode==2) {%>disabled="disabled"<%} %> type="file" id="upfile" name="file" value="选择文件" /></td>
					<td><input class="btn btn-primary btn-xs" type="submit" id="upfile" value="上传" /></td>
				</tr>
		</table>
	</form>
	<form action="<%=basePath%>servlet.AddCardServlet" method="post" name="form"onsubmit="return check()">
	<table class="table table-condensed table-bordered">
				<tr>
					<td><strong>名片信息</strong></td>
					<td>&nbsp;</td>
					<%if(img1!=null)out.println("<input name=\"img1\" type=\"hidden\" value=\""+img1+"\"/>"); %>
					<%if(img2!=null)out.println("<input name=\"img2\" type=\"hidden\" value=\""+img2+"\"/>"); %>
				</tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名:</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComJNam")==null){ %><input type="text" name="txtComJNam" value="">
<%}else{ %><input type="text" name="txtComJNam" value="<%=request.getSession().getAttribute("txtComJNam")%>"><%} %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名(拼音):</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComJNampy")==null){ %><input type="text" name="txtComJNampy" value="">
<%}else{ %><input type="text" name="txtComJNampy" value="<%=request.getSession().getAttribute("txtComJNampy")%>"><%} %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;公司名(英文):</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComJNameng")==null){ %><input type="text" name="txtComJNameng" value="">
<%}else{ %><input type="text" name="txtComJNameng" value="<%=request.getSession().getAttribute("txtComJNameng")%>"><%} %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;部门名:</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComunit")==null){ %><input type="text" name="txtComunit" value="">
<%}else{ %><input type="text" name="txtComunit" value="<%=request.getSession().getAttribute("txtComunit")%>"><%} %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;职务:</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComcaree")==null){ %><input type="text" name="txtComcaree" value="">
<%}else{ %><input type="text" name="txtComcaree" value="<%=request.getSession().getAttribute("txtComcaree")%>"><%} %><br></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;姓名:</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComname")==null){ %><input type="text" name="txtComname" value="">
<%}else{ %><input type="text" name="txtComname" value="<%=request.getSession().getAttribute("txtComname")%>"><%} %></td></tr>
	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;姓名(拼音):</span><br></td><td><%if(mode==0||request.getSession().getAttribute("txtComnamepy")==null){ %><input type="text" name="txtComnamepy" value="">
<%}else{ %><input type="text" name="txtComnamepy" value="<%=request.getSession().getAttribute("txtComnamepy")%>"><%} %></td></tr>




	<tr><td><span>&nbsp;&nbsp;&nbsp;&nbsp;设为我的名片:</span><br></td><td><input type="checkbox"  name="txtCommycard" value="on"></td></tr>
				</table>		
	</div>
	
	
	
	
	
	<div class="tab-pane" id="addr1">
	<table class="table table-bordered">
		<tbody>
			<tr>
				<td width="40%">&nbsp;&nbsp;&nbsp;<span>邮政编号:</span></td>
				<td><%if(mode==0||request.getSession().getAttribute("zip1")==null){ %><input  type="text" name="zip1" value="">
<%}else{ %><input  type="text" name="zip1" value="<%=request.getSession().getAttribute("zip1")%>"><%} %>&nbsp;</td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;住址 省:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipprovince1")==null){ %><input type="text" name="zipprovince1" value="">
<%}else{ %><input type="text" name="zipprovince1" value="<%=request.getSession().getAttribute("zipprovince1")%>"><%} %></td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;市:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipcity1")==null){ %><input type="text" name="zipcity1" value="">
<%}else{ %><input type="text" name="zipcity1" value="<%=request.getSession().getAttribute("zipcity1")%>"><%} %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>区:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipzone1")==null){ %><input type="text" name="zipzone1" value="">
<%}else{ %><input type="text" name="zipzone1" value="<%=request.getSession().getAttribute("zipzone1")%>"><%} %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>地址:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipaddress1")==null){ %><input type="text" name="zipaddress1" value="">
<%}else{ %><input type="text" name="zipaddress1" value="<%=request.getSession().getAttribute("zipaddress1")%>"><%} %></td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话1:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipphone1")==null){ %><input type="text" name="zipphone1" value="">
<%}else{ %><input type="text" name="zipphone1" value="<%=request.getSession().getAttribute("zipphone1")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话2:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipphone2")==null){ %><input type="text" name="zipphone2" value="">
<%}else{ %><input type="text" name="zipphone2" value="<%=request.getSession().getAttribute("zipphone2")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>手机:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipmobile1")==null){ %><input type="text" name="zipmobile1" value="">
<%}else{ %><input type="text" name="zipmobile1" value="<%=request.getSession().getAttribute("zipmobile1")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>传真:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipfax1")==null){ %><input type="text" name="zipfax1" value="">
<%}else{ %><input type="text" name="zipfax1" value="<%=request.getSession().getAttribute("zipfax1")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电子邮件:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipemail1")==null){ %><input id="zipemail1" type="text" name="zipemail1" value=""/>
<%}else{ %><input type="text" id="zipemail1" name="zipemail1" value="<%=request.getSession().getAttribute("zipemail1")%>"/><%} %>
</td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>URL:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipurl1")==null){ %><input type="text" name="zipurl1" value="">
<%}else{ %><input type="text" name="zipurl1" value="<%=request.getSession().getAttribute("zipurl1")%>"><%} %></td></tr>
		</tbody>
	</table>
	</div>
	<div class="tab-pane" id="addr2">
		<table class="table table-bordered">
			<tbody>
				<tr>
					<td width="40%">&nbsp;&nbsp;&nbsp;<span>邮政编号:</span></td>
					<td><%if(mode==0||request.getSession().getAttribute("zip2")==null){ %><input type="text" name="zip2" value="">
<%}else{ %><input type="text" name="zip2" value="<%=request.getSession().getAttribute("zip2")%>"><%} %>&nbsp;</td>
				</tr>
				<tr>
				<td><span>&nbsp;&nbsp;&nbsp;住址 省:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipprovince2")==null){ %><input type="text" name="zipprovince2" value="">
<%}else{ %><input type="text" name="zipprovince2" value="<%=request.getSession().getAttribute("zipprovince2")%>"><%} %></td>
			</tr>
			<tr>
				<td><span>&nbsp;&nbsp;&nbsp;市:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipcity2")==null){ %><input type="text" name="zipcity2" value="">
<%}else{ %><input type="text" name="zipcity2" value="<%=request.getSession().getAttribute("zipcity2")%>"><%} %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>区:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipzone2")==null){ %><input type="text" name="zipzone2" value="">
<%}else{ %><input type="text" name="zipzone2" value="<%=request.getSession().getAttribute("zipzone2")%>"><%} %></td>
			</tr>
			<tr>
				<td>&nbsp;&nbsp;&nbsp;<span>地址:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipaddress2")==null){ %><input type="text" name="zipaddress2" value="">
<%}else{ %><input type="text" name="zipaddress2" value="<%=request.getSession().getAttribute("zipaddress2")%>"><%} %></td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话1:</span></td><td><%if(mode==0||request.getSession().getAttribute("ziptelphone1")==null){ %><input type="text" name="ziptelphone1" value="">
<%}else{ %><input type="text" name="ziptelphone1" value="<%=request.getSession().getAttribute("ziptelphone1")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电话2:</span></td><td><%if(mode==0||request.getSession().getAttribute("ziptelphone2")==null){ %><input type="text" name="ziptelphone2" value="">
<%}else{ %><input type="text" name="ziptelphone2" value="<%=request.getSession().getAttribute("ziptelphone2")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>手机:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipmobile2")==null){ %><input type="text" name="zipmobile2" value="">
<%}else{ %><input type="text" name="zipmobile2" value="<%=request.getSession().getAttribute("zipmobile2")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>传真:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipfax2")==null){ %><input type="text" name="zipfax2" value="">
<%}else{ %><input type="text" name="zipfax2" value="<%=request.getSession().getAttribute("zipfax2")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>电子邮件:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipemail2")==null){ %><input type="text" name="zipemail2" id="zipemail2" value="">
<%}else{ %><input type="text" id="zipemail2" name="zipemail2" value="<%=request.getSession().getAttribute("zipemail2")%>"><%} %></td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>URL:</span></td><td><%if(mode==0||request.getSession().getAttribute("zipurl2")==null){ %><input type="text" name="zipurl2" value="">
<%}else{ %><input type="text" name="zipurl2" value="<%=request.getSession().getAttribute("zipurl2")%>"><%} %></td></tr>
			</tbody>
		</table>	
	</div>
	
	
	
	
	
	
	<div class="tab-pane" id="else">
		<table class="table table-bordered">
			<tr><td>&nbsp;&nbsp;&nbsp;<span>公开:</span></td>
				<td>
				<%if(mode==0){ %>
					<select style="width=200;" name="ddlstPublic"><option value="-1">--</option>
					<option value="1">公开</option>
					<option value="0" selected="selected">不公开</option></select>
				<% }else{%>
		                 <% switch(Integer.parseInt(request.getSession().getAttribute("ddlstPublic").toString())){
				                 case 1:{%>
				                 <select style="width=200;" name="ddlstPublic"><option value="-1">--</option>
						         <option value="1" selected="selected">公开</option>
						         <option value="0" >不公开</option></select><% break;}
						         case 0:{%>
				                 <select style="width=200;" name="ddlstPublic"><option value="-1">--</option>
				                 <option value="1" >公开</option>
			                     <option value="0" selected="selected">不公开</option></select><%break;}
			                     default :%>
			                     <select style="width=200;" name="ddlstPublic"><option value="-1">--</option>
					<option value="1">公开</option>
					<option value="0">不公开</option></select>
			                     <%}}%>
			               					
				</td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>重要度:</span></td>
				<td>
				<%if(mode==0){ %>
					<select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1">不重要</option>
						<option value="2">重要</option>
						<option value="3">很重要</option>
						<option value="4">非常重要</option></select>
				<%}else{ %>
				<% switch(Integer.parseInt(request.getSession().getAttribute("ddlstImptantKub").toString())){
				    case 1:{%>
				    <select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1"selected="selected">不重要</option>
						<option value="2">重要</option>
						<option value="3">很重要</option>
						<option value="4">非常重要</option></select><%break;} 
					case 2:	{%>
					<select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1">不重要</option>
						<option value="2"selected="selected">重要</option>
						<option value="3">很重要</option>
						<option value="4">非常重要</option></select><%break;} 
					case 3:	{%>
					<select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1">不重要</option>
						<option value="2">重要</option>
						<option value="3"selected="selected">很重要</option>
						<option value="4">非常重要</option></select><%break;} 
					case 4:	{%>
					<select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1">不重要</option>
						<option value="2">重要</option>
						<option value="3">很重要</option>
						<option value="4"selected="selected">非常重要</option></select><%break;} 
						default :%>
						
						<select name="ddlstImptantKub" style="width=200;"><option value="-1">--</option>
						<option value="1">不重要</option>
						<option value="2">重要</option>
						<option value="3">很重要</option>
						<option value="4">非常重要</option></select>
						<% }}%>
				</td>
			</tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>关系:</span></td>
				<td>
				<%if(mode==0||request.getSession().getAttribute("ddlstRelationKub")==null) {%>
					<select name="ddlstRelationKub" style="width=200;"><option value="-1">--</option>
						<option value="关键角色">关键角色</option>
						<option value="合作伙伴">合作伙伴</option>
						<option value="客户">客户</option>
						<option value="供应商">供应商</option>
						<option value="交易方">交易方</option>
						<option value="支援方">支援方</option>
						<option value="承建商">承建商</option>
						<option value="合约预定人">合约预定人</option>
						<option value="家人">家人</option>
						<option value="朋友">朋友</option>
						<option value="同事">同事</option>
						<option value="前辈/上司">前辈/上司</option>
						<option value="后辈">后辈</option>
						<option value="外包方">外包方</option>
						<option value="协力方">协力方</option>
						<option value="其他">其他</option></select>
				<%}else{%>
				
				<select name="ddlstRelationKub" style="width=200;"><option value="-1">--</option>
				<option value="<%=request.getSession().getAttribute("ddlstRelationKub")%>"selected="selected"><%=request.getSession().getAttribute("ddlstRelationKub")%></option>
						<option value="关键角色">关键角色</option>
						<option value="合作伙伴">合作伙伴</option>
						<option value="客户">客户</option>
						<option value="供应商">供应商</option>
						<option value="交易方">交易方</option>
						<option value="支援方">支援方</option>
						<option value="承建商">承建商</option>
						<option value="合约预定人">合约预定人</option>
						<option value="家人">家人</option>
						<option value="朋友">朋友</option>
						<option value="同事">同事</option>
						<option value="前辈/上司">前辈/上司</option>
						<option value="后辈">后辈</option>
						<option value="外包方">外包方</option>
						<option value="协力方">协力方</option>
						<option value="其他">其他</option></select>
						<%} %>
			</td></tr>
			<tr><td>&nbsp;&nbsp;&nbsp;<span>职业:</span></td>
				<td>
				<%if(mode==0||request.getSession().getAttribute("ddlstJobKub")==null){ %>
					<select name="ddlstJobKub" style="width=200;"><option value="-1">--</option>
						<option value="营业">营业</option>
						<option value="技术">技术</option>
						<option value="宣传">宣传</option>
						<option value="创作">创作</option>
						<option value="编辑">编辑</option>
						<option value="销售">销售</option>
						<option value="事务人员">事务人员</option>
						<option value="会计师">会计师</option>
						<option value="顾问">顾问</option>
						<option value="分析师">分析师</option>
						<option value="教职员">教职员</option>
						<option value="人事管理">人事管理</option>
						<option value="其他">其他</option>
						<option value="市场">市场</option>
						<option value="公务员">公务员</option></select>
						<%}else{ %>
						<select name="ddlstJobKub" style="width=200;"><option value="-1">--</option>
						<option value="<%=request.getSession().getAttribute("ddlstJobKub")%>"selected="selected"><%=request.getSession().getAttribute("ddlstJobKub")%></option>
						<option value="营业">营业</option>
						<option value="技术">技术</option>
						<option value="宣传">宣传</option>
						<option value="创作">创作</option>
						<option value="编辑">编辑</option>
						<option value="销售">销售</option>
						<option value="事务人员">事务人员</option>
						<option value="会计师">会计师</option>
						<option value="顾问">顾问</option>
						<option value="分析师">分析师</option>
						<option value="教职员">教职员</option>
						<option value="人事管理">人事管理</option>
						<option value="其他">其他</option>
						<option value="市场">市场</option>
						<option value="公务员">公务员</option></select>
						<%} %>
			</td></tr>
		</table>

	</div>
	<div class="tab-pane" id="pinfo">
		<table class="table table-bordered">
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>性别:</span><br></td>
				<td>
				<%if(mode==0||request.getSession().getAttribute("ddlstSexKub")==null){ %>
					<select name="ddlstSexKub" style="width=200;"><option value="0" selected="selected">--</option>
						<option value="男性">男性</option>
						<option value="女性">女性</option></select>
						<%}else{ %>
					<select name="ddlstSexKub" style="width=200;"><option value="0" selected="selected">--</option>
						<option value="<%=request.getSession().getAttribute("ddlstSexKub")%>"selected="selected"><%=request.getSession().getAttribute("ddlstSexKub")%></option>
						<option value="男性">男性</option>
						<option value="女性">女性</option></select>
						<%} %>
			</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>血型:</span></td>
				<td>
				<%if(mode==0||request.getSession().getAttribute("ddlstBlodKub")==null){ %>
					<select name="ddlstBlodKub" style="width=200;"><option value="0" selected="selected">--</option>
						<option value="A型">A型</option>
						<option value="B型">B型</option>
						<option value="O型">O型</option>
						<option value="AB型">AB型</option>
						<option value="不明">不明</option></select>
						<%}else{ %>
					<select name="ddlstBlodKub" style="width=200;"><option value="0" selected="selected">--</option>
						<option value="<%=request.getSession().getAttribute("ddlstBlodKub")%>"selected="selected"><%=request.getSession().getAttribute("ddlstBlodKub")%></option>
						<option value="A型">A型</option>
						<option value="B型">B型</option>
						<option value="O型">O型</option>
						<option value="AB型">AB型</option>
						<option value="不明">不明</option></select><%} %>
			</td></tr>
			
			
			
			
			
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>生日:</span></td>
				<td>
				<%if(mode==0||request.getSession().getAttribute("birthday")==null){ %><input type="text" name="birthday" value="">
<%}else{ %><input type="text" name="birthday" value="<%=request.getSession().getAttribute("birthday")%>"><%} %>
					
				</td>
			</tr>
			
						
			<tr><td align="left" width="100" rowspan="6" valign="top">&nbsp;&nbsp;&nbsp;<span>备忘录:</span></td>
				<td rowspan="6">
				<%if(mode==0||request.getSession().getAttribute("txtMemo")==null){ %><textarea name="txtMemo" value=""cols="26" rows="6"></textarea>
<%}else{ %><textarea  name="txtMemo" value="<%=request.getSession().getAttribute("txtMemo")%>"cols="26" rows="6"><%=request.getSession().getAttribute("txtMemo")%></textarea><%} %>				
			</td></tr>
		</table>

		
	</div>
	<div class="tab-pane" id="cmpinfo">
		<table class="table table-bordered">
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>行业:</span><br></td><td><%if(mode==0||request.getSession().getAttribute("industry")==null){ %><input type="text" name="industry" value="">
<%}else{ %><input type="text" name="industry" value="<%=request.getSession().getAttribute("industry")%>"><%} %>
				</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>成立年月:</span></td><td><%if(mode==0||request.getSession().getAttribute("establish")==null){ %><input type="text" name="establish" value="">
<%}else{ %><input type="text" name="establish" value="<%=request.getSession().getAttribute("establish")%>"><%} %>
				</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>资金(百万):</span></td><td><%if(mode==0||request.getSession().getAttribute("funding")==null){ %><input type="text" name="funding" value="">
<%}else{ %><input type="text" name="funding" value="<%=request.getSession().getAttribute("funding")%>"><%} %>
				</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>员工数:</span></td><td><%if(mode==0||request.getSession().getAttribute("staff")==null){ %><input type="text" name="staff" value="">
<%}else{ %><input type="text" name="staff" value="<%=request.getSession().getAttribute("staff")%>"><%} %>
				</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>证券代码:</span></td><td><%if(mode==0||request.getSession().getAttribute("security")==null){ %><input type="text" name="security" value="">
<%}else{ %><input type="text" name="security" value="<%=request.getSession().getAttribute("security")%>"><%} %>
				</td></tr>
			<tr><td align="left" width="100">&nbsp;&nbsp;&nbsp;<span>法人代表:</span></td><td><%if(mode==0||request.getSession().getAttribute("corporate")==null){ %><input type="text" name="corporate" value="">
<%}else{ %>
<input type="text" name="corporate" value="<%=request.getSession().getAttribute("corporate")%>">
<%} %>
				<input id="mode" name="mode" type="hidden" value="<%=mode %>" ></input>
				<input name="cardid" type="hidden" value="<%=request.getSession().getAttribute("cardid") %>" ></input>
				</td></tr>
				
		</table>
			
	</div>
</div>
	
		</div>
		<button style="margin-left:400px" type="submit" class="btn btn-primary" id="submitbtn" >
		<%if(mode==0){
				 %>提交<%
		}else{
		%>更新<%} %>
		</button>
	
	</div>
	</form>	
	
</body>
</html>